import * as types from './mutation-types'

export default {
	[types.UPDATE_USER_INFO](state,payload){
		state.userInfo = payload;
	},
	[types.UPDATE_TOKEN](state,payload){
		state.token = payload;
	},
	[types.UPDATE_REAL](state,payload){
		state.real = payload
	},
	[types.UPDATE_SIGN](state,payload){
		state.sign = payload
	},
	[types.UPDATE_PETS](state,payload){
		state.pets = payload
	},
	setCanNumber(state,payload){
		state.userInfo&&(state.userInfo.canNumber=payload)
	},
	mixUnread(state,payload){
		state.unread = {
			...state.unread,
			...payload
		}
	},
	mixUserInfo(state,payload){
		state.userInfo = {
			...state.userInfo,
			...payload
		}
	}
}
